package com.igeek;

import com.igeek.boot.entity.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;

@EnableConfigurationProperties({MyServer.class, Person.class, People.class, Man.class})
@SpringBootApplication
@Slf4j
public class Boot2PropsApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ac = SpringApplication.run(Boot2PropsApplication.class, args);
        MyServer server = ac.getBean(MyServer.class);
        log.info("server:{}",server);
        Person person = ac.getBean(Person.class);
        log.info("person:{}",person);

    }

}
